package com.itheima.controller;

import com.itheima.pojo.PageBean;
import com.itheima.pojo.Result;
import com.itheima.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: LogController
 * @Author: HH
 * @Date: 2025/4/29 10:09
 **/
@Slf4j
@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private LogService logService;

    /**
     * 分页查询日志记录
     * @return
     */
    @GetMapping("/page")
    public Result page(Integer page, Integer pageSize) {
        log.info("日志记录");
        PageBean pageBean = logService.page(page, pageSize);
        return Result.success(pageBean);
    }

}
